using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ModelTools._Iterator
{
    /// <summary>
    /// <para>Iterate Workspaces</para>
    /// <para>Iterates over workspaces in a folder.</para>
    /// <para>循环访问文件夹中的工作区。</para>
    /// </summary>    
    [DisplayName("Iterate Workspaces")]
    public class IterateWorkspaces : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public IterateWorkspaces()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_folder">
        /// <para>Folder</para>
        /// <para>The folder which stores the workspace to iterate.</para>
        /// <para>存储要迭代的工作区的文件夹。</para>
        /// </param>
        public IterateWorkspaces(object _in_folder)
        {
            this._in_folder = _in_folder;
        }
        public override string ToolboxName => "Model Tools";

        public override string ToolName => "Iterate Workspaces";

        public override string CallName => "mb.IterateWorkspaces";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_folder, _wildcard, _workspace_type.GetGPValue(), _recursive.GetGPValue(), _workspace, _name];

        /// <summary>
        /// <para>Folder</para>
        /// <para>The folder which stores the workspace to iterate.</para>
        /// <para>存储要迭代的工作区的文件夹。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Folder")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_folder { get; set; }


        /// <summary>
        /// <para>Wildcard</para>
        /// <para>A combination of * and characters that help to limit the results. The asterisk is the same as saying ALL. If no wildcard is specified, all inputs will be returned. For example, it can be used to restrict Iteration over input names starting with a certain character or word (for example, A* or Ari* or Land* and so on).</para>
        /// <para>* 和字符的组合，有助于限制结果。星号与说 ALL 相同。如果未指定通配符，则将返回所有输入。例如，它可用于限制对以特定字符或单词开头的输入名称（例如，A* 或 Ari* 或 Land* 等）的迭代。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Wildcard")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _wildcard { get; set; } = null;


        /// <summary>
        /// <para>Workspace Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the workspace type to find.</para>
        ///   <bulletList>
        ///     <bullet_item>File geodatabase—Only file geodatabases will be the output.</bullet_item><para/>
        ///     <bullet_item>Folder—Only folders will be the output.</bullet_item><para/>
        ///     <bullet_item>Enterprise geodatabase—Only enterprise geodatabases will be the output.</bullet_item><para/>
        ///     <bullet_item>BIM—Only BIM workspaces will be the output.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要查找的工作区类型。</para>
        ///   <bulletList>
        ///     <bullet_item>文件地理数据库 - 只有文件地理数据库是输出。</bullet_item><para/>
        ///     <bullet_item>文件夹 - 仅文件夹是输出。</bullet_item><para/>
        ///     <bullet_item>企业级地理数据库 - 只有企业级地理数据库是输出。</bullet_item><para/>
        ///     <bullet_item>BIM—仅 BIM 工作空间是输出。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Workspace Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _workspace_type_value? _workspace_type { get; set; } = null;

        public enum _workspace_type_value
        {
            /// <summary>
            /// <para>File geodatabase</para>
            /// <para>File geodatabase—Only file geodatabases will be the output.</para>
            /// <para>文件地理数据库 - 只有文件地理数据库是输出。</para>
            /// </summary>
            [Description("File geodatabase")]
            [GPEnumValue("FILEGDB")]
            _FILEGDB,

            /// <summary>
            /// <para>Folder</para>
            /// <para>Folder—Only folders will be the output.</para>
            /// <para>文件夹 - 仅文件夹是输出。</para>
            /// </summary>
            [Description("Folder")]
            [GPEnumValue("FOLDER")]
            _FOLDER,

            /// <summary>
            /// <para>Enterprise geodatabase</para>
            /// <para>Enterprise geodatabase—Only enterprise geodatabases will be the output.</para>
            /// <para>企业级地理数据库 - 只有企业级地理数据库是输出。</para>
            /// </summary>
            [Description("Enterprise geodatabase")]
            [GPEnumValue("SDE")]
            _SDE,

            /// <summary>
            /// <para>BIM</para>
            /// <para>BIM—Only BIM workspaces will be the output.</para>
            /// <para>BIM—仅 BIM 工作空间是输出。</para>
            /// </summary>
            [Description("BIM")]
            [GPEnumValue("BIM")]
            _BIM,

        }

        /// <summary>
        /// <para>Recursive</para>
        /// <para><xdoc>
        ///   <para>Specifies if subfolders in the main folder will be iterated through recursively.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Will iterate through all subfolders.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Will not iterate through all subfolders. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否以递归方式循环访问主文件夹中的子文件夹。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 （Checked） - 将循环访问所有子文件夹。</bullet_item><para/>
        ///     <bullet_item>未选中 - 不会循环访问所有子文件夹。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Recursive")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _recursive_value _recursive { get; set; } = _recursive_value._false;

        public enum _recursive_value
        {
            /// <summary>
            /// <para>RECURSIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("RECURSIVE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NOT_RECURSIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NOT_RECURSIVE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Workspace</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Workspace")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _workspace { get; set; }


        /// <summary>
        /// <para>Name</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Name")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _name { get; set; }


        public IterateWorkspaces SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}